<script type="text/javascript">
    $('#userName').html(user.user_name);
    $('#quit').click(function () {
        $.ajax({
            url: '/loginout',
            type: 'get',
            data: {},
            async: false,
            success: function (data, status) {
                if (status == 'success') {
                    window.location.href = '/login'
                }
            },
            error: function (data, status) {
                if (status == 'error') {
                    window.location.href = '/login'
                }
            }
        }
        );
    });
</script>
<div class="navbar-container ace-save-state" id="navbar-container">
    <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
        <span class="sr-only">Toggle sidebar</span>

        <span class="icon-bar"></span>

        <span class="icon-bar"></span>

        <span class="icon-bar"></span>
    </button>

    <div class="navbar-header pull-left">
        <a href="index.html" class="navbar-brand">
            <small>
                <i class="fa fa-leaf"></i>
                检验检测智能管理平台
            </small>
        </a>
    </div>

    <div class="navbar-buttons navbar-header pull-right" role="navigation">
        <ul class="nav ace-nav">

            <li class="light-blue dropdown-modal">
                <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                    <img class="nav-user-photo" src="assets/images/avatars/user.jpg" alt="Jason's Photo" />
                    <span class="user-info">
                        <small>你好,</small>
                        <span id="userName">null</span>
                    </span>

                    <i class="ace-icon fa fa-caret-down"></i>
                </a>

                <ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                    <li>
                        <a href="changePwd.html">
                            <i class="ace-icon fa fa-cog"></i>
                            修改密码
                        </a>
                    </li>

                    <li>
                        <a href="profile.html">
                            <i class="ace-icon fa fa-user"></i>
                            我的主页
                        </a>
                    </li>

                    <li class="divider"></li>

                    <li>
                        <a href="" id="quit">
                            <i class="ace-icon fa fa-power-off"></i>
                            注销
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div><!-- /.navbar-container -->
